<?php

/**
 * GameSet filter form base class.
 *
 * @package    aiontoolskit
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseGameSetFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'name'          => new sfWidgetFormFilterInput(),
      'item1'         => new sfWidgetFormFilterInput(),
      'item2'         => new sfWidgetFormFilterInput(),
      'item3'         => new sfWidgetFormFilterInput(),
      'item4'         => new sfWidgetFormFilterInput(),
      'item5'         => new sfWidgetFormFilterInput(),
      'item6'         => new sfWidgetFormFilterInput(),
      'item7'         => new sfWidgetFormFilterInput(),
      'piece_bonus2'  => new sfWidgetFormFilterInput(),
      'piece_bonus3'  => new sfWidgetFormFilterInput(),
      'piece_bonus4'  => new sfWidgetFormFilterInput(),
      'piece_bonus5'  => new sfWidgetFormFilterInput(),
      'fullset_bonus' => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'name'          => new sfValidatorPass(array('required' => false)),
      'item1'         => new sfValidatorPass(array('required' => false)),
      'item2'         => new sfValidatorPass(array('required' => false)),
      'item3'         => new sfValidatorPass(array('required' => false)),
      'item4'         => new sfValidatorPass(array('required' => false)),
      'item5'         => new sfValidatorPass(array('required' => false)),
      'item6'         => new sfValidatorPass(array('required' => false)),
      'item7'         => new sfValidatorPass(array('required' => false)),
      'piece_bonus2'  => new sfValidatorPass(array('required' => false)),
      'piece_bonus3'  => new sfValidatorPass(array('required' => false)),
      'piece_bonus4'  => new sfValidatorPass(array('required' => false)),
      'piece_bonus5'  => new sfValidatorPass(array('required' => false)),
      'fullset_bonus' => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('game_set_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'GameSet';
  }

  public function getFields()
  {
    return array(
      'id'            => 'Number',
      'name'          => 'Text',
      'item1'         => 'Text',
      'item2'         => 'Text',
      'item3'         => 'Text',
      'item4'         => 'Text',
      'item5'         => 'Text',
      'item6'         => 'Text',
      'item7'         => 'Text',
      'piece_bonus2'  => 'Text',
      'piece_bonus3'  => 'Text',
      'piece_bonus4'  => 'Text',
      'piece_bonus5'  => 'Text',
      'fullset_bonus' => 'Text',
    );
  }
}
